package com.pay.cloud.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.pay.cloud.BindState;
import com.pay.cloud.DataFactory;
import com.pay.cloud.DataStore;
import com.pay.cloud.R;


public class ShopInfoFragment extends AbstractFragment implements BindState {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view =  inflater.inflate(R.layout.fragment_shop_info, container, false);
        DataStore store = DataFactory.getDataStore();
        TextView deviceIdView = view.findViewById(R.id.device_id);
        deviceIdView.setText(store.getDeviceId());
        TextView deviceNameView = view.findViewById(R.id.device_name);
        deviceNameView.setText(store.getDeviceName());
        TextView shopIdView = view.findViewById(R.id.shop_id);
        shopIdView.setText(store.getOutShopId());
        TextView shopNameView = view.findViewById(R.id.shop_name);
        shopNameView.setText(store.getShopName());
        TextView staffIdView = view.findViewById(R.id.staff_id);
        staffIdView.setText(store.getStaffId());
        TextView staffNameView = view.findViewById(R.id.staff_name);
        staffNameView.setText(store.getStaffName());
        return view;

    }

}
